<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        table{
            border-collapse: collapse;
        }
    </style>
    <link rel="stylesheet" href="{% static '123.css' %}">
</head>
<body>
<h1 class="zhc">
    222
</h1>
<a href="{% url 'news:add' %}">添加</a>
<form action="{% url 'news:index' %}">
    {% csrf_token %}
    <table border="1">
        <tr>
            <th>ID</th>
            <th>新闻标题</th>
            <th>新闻分类</th>
            <th>操作</th>
        </tr>
        {% for i in data %}
        <tr>
            <td>{{ i.id }}</td>
            <td>{{ i.name }}</td>
            <td>{{ i.fl.name }}</td>
            <td>
                <a href="{% url 'news:deletnew' i.id %}">删除</a>
                <a href="{% url 'news:update' i.id %}">修改</a>
            </td>
        </tr>
        {% endfor %}

    </table>
</form>

</body>
</html>